home *** CD-ROM | disk | FTP | other *** search
- /***************************************************************************
- * *
- * $VER: Cartesian_Coords.pvrx 1.0 (10.Aug.94) *
- * Copyright © 1994 by Stylus, Inc. *
- * Author: Jeff Blume *
- * *
- * Set the page to a Cartesian coordinate system with the origin in the *
- * center of the page. *
- * *
- * *
- ***************************************************************************/
-
- /*
- call open STDOUT,"RAD:RxOut.txt",W
- call open STDERR,"RAD:RxErr.txt",W
- trace R
- */
-
- 'Lock'
- if rc ~= 0 then exit
-
- 'GetPageSize' Pdims
-
- CPX = Pdims.X2 + Pdims.X1
- if CPX ~= 0 then do
- CPX = CPX / 2
- Pdims.X1 = -CPX
- Pdims.X2 = CPX
- end
-
- CPY = Pdims.Y2 + Pdims.Y1
- if CPY ~= 0 then do
- CPY = CPY / 2
- Pdims.Y1 = CPY
- Pdims.Y2 = -CPY
- end
-
- if CPX ~= 0 & CPY ~= 0 then 'SetPageSize' Pdims
- else 'GetBool "Origin already centered." "OK" "OK"'
- /* This doesn't cover case where origin is centered,
- but Y axis is descending. */
-
- 'UnLock'
-
-
- EXIT
-